# coding=utf-8
from common.sqlOperate import *

host = '192.168.3.44'
# host = 'localhost'
port = 3306
user = 'test123'
password = 'test1234'
db = 'gwza172gateway'
ob = sqlOperate(host, port, user, password, db)
ob.sqlConnect()
df = pd.read_excel('./config/data.xls',sheet_name='410', header=0)
values = df.values

print(len(values))
arr2 =[]
for v in values:
    arr2.append(v[0])
print(arr2)

for device in arr2:
    #device = 'GW4E33'
    res = ob.queryMome(device)
    print(device)
    print(res)


ob.closeConnection()
